﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AGameOfThrones.tokens
{
    /// <summary>
    /// Interaction logic for powertokens.xaml
    /// </summary>
    public partial class powertokens : UserControl
    {

        public Panel Panel { get { return powertokens_panel; } }

        public powertokens()
        {
            InitializeComponent();
        }

        private void powertokens_control_Loaded(object sender, RoutedEventArgs e)
        {
            game.house h = this.DataContext as game.house;
            if(h!= null)
            {
                for (int i = 0; i < h.PowerTokens.Count; i++)
                {
                    game.powertoken powertoken = h.PowerTokens[i];
                    powertoken.FrontImage = h.PowerTokenImage;
                    piece.piece piece = new piece.piece();
                    piece.DataContext = powertoken;
                    powertokens_panel.Children.Add(piece);

                    powertoken.Position.Panel = powertokens_panel.Name;
                    powertoken.Position.X = 0;
                    powertoken.Position.Y = 0;
                }                   
            }
        }

        private void powertokens_control_Drop(object sender, DragEventArgs e)
        {

        }

        private void powertokens_control_DragOver(object sender, DragEventArgs e)
        {

        }
    }
}
